package com.leyou.common.exceptions;

import com.leyou.common.enums.ItemExceptionEnum;
import lombok.Getter;

/**
 * @version V1.0
 * @author: Ljxpa
 * @date: 2020/03/02 21:12
 * @description: 自定义异常，用于item操作时发生异常抛出
 */
@Getter
public class LyException extends RuntimeException{
	private int status;

	public LyException(ItemExceptionEnum em) {
		super(em.getMessage());
		this.status = em.getStatus();
	}

	public LyException(ItemExceptionEnum em, Throwable cause) {
		super(em.getMessage(), cause);
		this.status = em.getStatus();
	}
}
